package com.zllkj.mm.adapter

import androidx.appcompat.widget.AppCompatImageView
import androidx.appcompat.widget.AppCompatTextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.zllkj.mm.R
import com.zllkj.mm.model.entity.InvitationListVoRecord
import com.zllkj.mm.model.entity.WriteOffFreeTimeHistoryListVoRecord
import com.zllkj.mm.util.common.FormatUtil
import com.zllkj.mm.util.common.PictureLoadUtil

class WaitToConfirmFreetimeDetailAdapter(layoutResId: Int, data: List<InvitationListVoRecord?>?) :
        BaseQuickAdapter<InvitationListVoRecord, BaseViewHolder>(layoutResId, data) {
    override fun convert(baseViewHolder: BaseViewHolder, vm: InvitationListVoRecord) {
        vm?.let {
            var ivHead = baseViewHolder.getView<AppCompatImageView>(R.id.ivhead)
            baseViewHolder.getView<AppCompatTextView>(R.id.tv_item_freetime_inviter_name).text = it.nikeName

            baseViewHolder.getView<AppCompatTextView>(R.id.tv_item_freetime_inviter_time_content).text = it.startTime + "---" + it.endTime
            PictureLoadUtil.loadPic(baseViewHolder.getView<AppCompatImageView>(R.id.iv_item_freetime_history),it.userLogo)
            baseViewHolder.addOnClickListener(R.id.btn_confirm)
            baseViewHolder.addOnClickListener(R.id.btn_cancel)
        }

    }
}